1
کامپیوتر و شبکه::
داده سبد خرید
In the sections that follow, I demonstrate how to store the cart data using the ASP.NET Core MVC session data feature and explain how this can be used to prevent the problem shown in Figure 9-5.
The mechanism that I will use to store the data can be used to store any string data but using a C# class and the MVC model binding feature will ensure only cart data can be stored, preventing this feature from being abused to store any arbitrary data that a client sends.
The next step is to create an HTTP web service that will allow the client to send cart data to ASP.NET Core MVC to be stored.
Not all cart data will result in completed purchases, and using session data will ensure that abandoned cart data will automatically expire and, as you will see, make it simple to provide the client with its client data when the user reloads the browser.
Now that ASP.NET Core MVC has been configured to use session data, it is time to create the web service that will allow the Angular application to store its cart data.
واژگان شبکه مترجمین ایران